package com.ch04.ex45;


import java.util.ArrayList;
import java.util.List;

/**
 * Created by zc on 2016/2/18.
 */
public class ProductListGenerator {

    public List<Product> generate(int size){
        List<Product> resultList = new ArrayList<>();
        for(int i=0; i<size; i++){
            Product product = new Product();
            product.setName("Product" + i);
            product.setPrice(10);
            resultList.add(product);
        }
        return resultList;
    }
}
